<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>后台 - 会员管理</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
    <link href="__PUBLIC__/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">

</head>
<style>
    /*分页样式*/
    .pages a,.pages span {
        display:inline-block;
        padding:4px 7px;
        margin:0 2px;
        border:1px solid #D5D4D4;
        -webkit-border-radius:1px;
        -moz-border-radius:1px;
        border-radius:1px;
    }
    .pages a,.pages li {
        display:inline-block;
        list-style: none;
        text-decoration:none; color:#3399ff;
    }
    .pages a:hover{
        border-color:#3399ff;
    }
    .pages span.current{
        background:#3399ff;
        color:#FFF;
        font-weight:700;
        border-color:#3399ff;
    }
    .pages{
        text-align: center;
    }
    /*分页样式*/

    .layui-layer{
        top:48px !important;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>房间说明列表</h5>
                </div>
                <div class="ibox-title">
                  <a style="text-decoration: none;color:red" href="{:U('admin/gametest/add')}">  <h5>添加房间说明</h5></a>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-4">

                        </div>
                    </div>
                    <div class="" >
                        <table class="table table-striped table-hover table-bordered" style="width:auto;overflow:auto;display:inline-block;">
                            <thead>
                            <tr>
                                <!-- <th></th> -->
                                <th>标题</th>
                                <th>所属游戏</th>
                                <th>创建时间</th>
                                <th>修改时间</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                                <volist name='list' id="vo">
                                            <tr>
                                                <td  style="text-align: center;">{$vo.title}</td>
                                                <td  >{$vo.game}</td>
                                                <td  >{$vo.time|date="Y-m-d H:i:s",###}</td>
                                                <td  >{$vo.uptime|date="Y-m-d H:i:s",###}</td>
                                                <td><if condition="$vo.status eq '1'"><a id="stats" tip-id="{$vo.id}" tio-status="0">显示</a><else/><a id="stats" tip-id="{$vo.id}" tio-status="1">隐藏</a></if></td>
                                                <td><a href="{:U('admin/gametest/edit?id='.$vo['id'])}">修改</td>
                                            </tr>
                                </volist>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<script src="__PUBLIC__/Admin/js/jquery.min.js?v=2.1.4"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/Admin/js/plugins/iCheck/icheck.min.js"></script>
<script src="__PUBLIC__/Common/layer/layer.js"></script>
<script>

    $(document).on("click", "[tip-id]", function() {

        var obj       = $(this);
        var id = $(obj).attr('tip-id');
        var status=$(obj).attr('tio-status');


        var data=  {id:id,status:status};
        $.ajax({
            url:"{:U('Admin/gametest/status')}",
            type: 'post',
            data:data,
            success: function (data) {
                if(data.status==1){
                    layer.msg(data.info, {icon: 1,shade:0.8});
                    setTimeout('myrefresh()',1000); //指定1秒刷新一次
                }else{
                    layer.msg(data.info,{icon: 2,shade:0.8});
                }
            }
        })

    });


    function myrefresh()
    {
        window.location.reload();
    }


    $(document).ready(function() {
        $(".i-checks").iCheck({
            checkboxClass: "icheckbox_square-green",
            radioClass: "iradio_square-green",
        })
    });




</script>



<script>
    function integral(id){
        layer.open({
            type: 2,
            title: '会员上分',
            shadeClose: true,
            shade: false,
            maxmin: true, //开启最大化最小化按钮
            area: ['300px', '500px'],
            content: "__APP__/Admin/Integral/index/id/" + id + ""
        });
    }
    function under(id){
        layer.open({
            type: 2,
            title: '会员下分',
            shadeClose: true,
            shade: false,
            maxmin: true, //开启最大化最小化按钮
            area: ['300px', '500px'],
            content: "__APP__/Admin/Integral/under/id/" + id + ""
        });
    }
    function edit(id){
        layer.open({
            type: 2,
            title: '编辑',
            shadeClose: true,
            shade: false,
            maxmin: true, //开启最大化最小化按钮
            area: ['600px', '500px'],
            content: "__APP__/Admin/Member/edit/id/" + id + ""
        });
    }
    function disable(id){
        layer.confirm('确定要禁用吗？禁用后将不能登录。', {
            btn: ['确定','取消'] //按钮
        }, function(){
            window.location.href="__APP__/Admin/Member/disable/id/" + id + ""
        });
    }

    function del(id){
        layer.confirm('确定要彻底删除吗？', {
            btn: ['确定','取消'] //按钮
        }, function(){
            window.location.href="__APP__/Admin/Member/delete/id/" + id + ""
        });
    }

    function endisable(id){
        layer.confirm('确定要启用吗？', {
            btn: ['确定','取消'] //按钮
        }, function(){
            window.location.href="__APP__/Admin/Member/endisable/id/" + id + ""
        });
    }


    function set_robot(id){
        layer.confirm('确定要设置为假人吗，假人数据不计入各项统计', {
            btn: ['确定','取消'] //按钮
        }, function(){
            window.location.href="__APP__/Admin/Member/set_robot/id/" + id + ""
        });
    }
    function cancel_robot(id){
        layer.confirm('确定要取消假人吗', {
            btn: ['确定','取消'] //按钮
        }, function(){
            window.location.href="__APP__/Admin/Member/cancel_robot/id/" + id + ""
        });
    }

    function set_agent(id){
        layer.confirm('确定要设置为代理吗，代理可以登录代理后台，帐号为会员的用户号，密码可以编辑设置', {
            btn: ['确定','取消'] //按钮
        }, function(){
            window.location.href="__APP__/Admin/Member/set_agent/id/" + id + ""
        });
    }
    function cancel_agent(id){
        layer.confirm('确定要取消代理吗', {
            btn: ['确定','取消'] //按钮
        }, function(){
            window.location.href="__APP__/Admin/Member/cancel_agent/id/" + id + ""
        });
    }
</script>
</body>


</html>